package com.erp.erp_ui.money.enums;


/**
 * @ClassName : MoneyOperationStatusEnum
 * @Description : 资金管理操作状态枚举
 * @Author : lst
 * @Date: 2020-12-04 23:21
 */
public enum MoneyOperationStatusEnum {

    REGISTRATION_BOX(1, "登记箱"),
    FIND_BOX(2, "招领箱"),
    TO_BE_CONFIRMED_BOX(3, "待确认箱"),
    CONFIRMATION_BOX(4, "确认箱"),
    COMPLETION_BOX(5, "完成箱"),
    TRASH_CAN(6, "垃圾箱");

    /**
     * id
     */
    private int id;

    /**
     * 描述
     */
    private String desc;

    public int getId() {
        return id;
    }

    public String getDesc() {
        return desc;
    }

    MoneyOperationStatusEnum(int id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    /**
     * 通过id获取描述信息
     * @param id
     * @return
     */
    public static String getDescById(int id){
        for(MoneyOperationStatusEnum moneyOperationStatusEnum : MoneyOperationStatusEnum.values()){
            if(moneyOperationStatusEnum.getId() == id){
                return moneyOperationStatusEnum.getDesc();
            }
        }
        return "";
    }

}
